<?php
namespace app\index\Validate;
use think\Validate;

class Join extends Validate{

    //验证规则
    protected $rule = [
        'a_name'       =>'require|max:20',
        'a_school'     =>'require',
        'a_major'      =>'require|max:20',
        'a_qq'         =>'number',
        'a_phone'      =>'number',
    ];

    protected $message  =  [
        'a_name.require'    => '姓名必须填写',
        'a_name.max'        => '姓名长度超过限制',
        'a_school.require'  => '学校必填',
        'a_major.require'   => '专业必填',
        'a_major.max'       => '专业长度超过限制',
        'a_qq.number'       => 'QQ号格式错误',
        'a_phone.number'    => '手机号格式错误',
    ];


}